package com.msb.controller;

import com.msb.pojo.Person;
import org.springframework.web.bind.annotation.*;

/**
 * @author sunpeng
 * @Date 2021-07-19 10:07
 */
@RestController
public class HelloController {

    @RequestMapping("demoGet")
    public String demoGet(String string){
        System.out.println(string);
        return "success: "+string;
    }

    @RequestMapping("demoPost")
    public Person demoPost(Person person){
        System.out.println(person);
        return person;
    }

    @RequestMapping(value = "json")
    public Person demoJson(@RequestBody Person person){
        System.out.println(person);
        return person;
    }
}
